package net.csdra.libraryborrowing.service.book;

import net.csdra.libraryborrowing.domain.book.BookCopy;

import java.nio.file.AccessDeniedException;

/**
 * Created by msf on 2017/10/16.
 */
public interface BookCopyManageService {
    /**
     * 修改副本信息，并维护副本日志（BookCopyLog）
     *
     * @param updateBookCopy
     * @return
     */
    public BookCopy updateBookCopy(UpdateBookCopy updateBookCopy) throws AccessDeniedException;

    /**
     * 创建新的副本 ，并维护副本日志（BookCopyLog）
     *
     * @param createBookCope
     * @return
     */
    public BookCopy createBookCopy(CreateBookCopy createBookCope) throws AccessDeniedException;

    class UpdateBookCopy extends CreateBookCopy {
        String bookCopyId;
        Boolean deleted;
        Boolean enabled;

        public String getBookCopyId() {
            return bookCopyId;
        }

        public void setBookCopyId(String bookCopyId) {
            this.bookCopyId = bookCopyId;
        }

        public Boolean getDeleted() {
            return deleted;
        }

        public void setDeleted(Boolean deleted) {
            this.deleted = deleted;
        }

        public Boolean getEnabled() {
            return enabled;
        }

        public void setEnabled(Boolean enabled) {
            this.enabled = enabled;
        }
    }

    class CreateBookCopy {
        String libNumber;

        String state;

        String bookInfoId;

        public String getLibNumber() {
            return libNumber;
        }

        public void setLibNumber(String libNumber) {
            this.libNumber = libNumber;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        public String getBookInfoId() {
            return bookInfoId;
        }

        public void setBookInfoId(String bookInfoId) {
            this.bookInfoId = bookInfoId;
        }
    }
}
